import request from '@/utils/request'

// 查询产品订单列表
export function listProorder(query) {
  return request({
    url: '/mes/proorder/orderList',
    method: 'get',
    params: query
  })
}

// 查询产品订单详细
export function getProorder(id) {
  return request({
    url: '/mes/proorder/getDetails',
    method: 'get',
    params: {
      orderId: id
    }
  })
}

// 新增产品订单
export function addProorder(data) {
  return request({
    url: '/mes/proorder/saveOrder',
    method: 'post',
    data: data
  })
}

// 修改产品订单
export function updateProorder(data) {
  return request({
    url: '/mes/proorder/editProOrder',
    method: 'put',
    data: data
  })
}

// 删除产品订单
export function delProorder(id) {
  return request({
    url: '/mes/proorder/deleteByOrderId',
    method: 'delete',
    params: {
      orderId: id
    }
  })
}
// 出库
export function proOuthou(data) {
  return request({
    url: '/mes/proorder/proOuthou',
    method: 'post',
    data: data
  })
}
//订单出库记录
export function getOutHouInfo(query) {
  return request({
    url: '/mes/proorder/getOutHouInfo',
    method: 'get',
    params: query
  })
}

